/**
 * @License: (C) Copyright 2013-2022
 * @Contact: abcque@outlook.com
 * @IDE: IntelliJ IDEA
 * @Encoding: utf-8
 * @Project: st2212 2213
 * @Package: PACKAGE_NAME
 * @File: While1.java
 * @Time: 2022/12/3 10:32
 * @Author: abcque
 * @Description: 猴子吃桃问题
 * @Modifier:
 * @ModifyDate:
 * @ModifyRemark:
 */
public class While1 {
    public static void main(String[] args) {
        // 天数
        int day = 10;
        // 桃子数量
        int peach = 1;

        System.out.println("第" + day + "天早上的桃子数量是：" + peach);
        while (day > 1) {
            peach = (peach + 1) * 2;
            --day;
            System.out.println("第" + day + "天早上的桃子数量是：" + peach);
        }
    }
}
